package com.huanuo.internetofthings.service.role;

import com.huanuo.internetofthings.bo.userRole.UserRole;
import com.huanuo.internetofthings.dao.userRole.UserRoleMapper;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.unicorn.framework.base.base.AbstractService;
import org.unicorn.framework.core.SysCode;
import org.unicorn.framework.core.exception.PendingException;

@Service
public class UserRoleService extends AbstractService {

	@Autowired
	private UserRoleMapper userRoleMapper;

	public List<UserRole> selectUserRoleList(UserRole userRole) throws PendingException {
		try {
			return this.userRoleMapper.selectList(userRole);
		} catch (Exception e) {
			error("查询用户拥有的角色", e);
			throw new PendingException(SysCode.DB_ERROR, "查询用户拥有的角色");
		}
		
	}
}